Skip to content

Add --version to the CLI - #436

Merged
jeremymanning merged 1 commit into
mainfrom
fix/cli-version-option
Aug 1, 2026
Merged

Add --version to the CLI#436
jeremymanning merged 1 commit into
mainfrom
fix/cli-version-option

Conversation

@jeremymanning

Copy link
Copy Markdown
Member

Found by a release rehearsal against the built wheel while checking whether the repo is ready for its first tag — not by any test:

$ orchestrator --version
Error: No such option '--version'. Did you mean '--verbose'?

There was no way to ask an installed copy what version it is. That is the first thing anyone runs against a release, so it should land before a tag exists.

Implementation note

Uses click's package_name= form, which reads the version from installed distribution metadata rather than importing the package. That matters here: this repo has a hard-won property that the CLI does not touch provider credentials unless a model is genuinely demanded, and importing the package to read __version__ would put an import on that path for no reason.

Both properties are tested:

  • the output carries the real version
  • a decoy ~/.orchestrator/.env is never read while answering --version

Verified

Built wheel, clean venv, orchestrator --version orchestrator, version 0.1.0
Built wheel, py-orc --version orchestrator, version 0.1.0
Source checkout with PYTHONPATH=src works
Blocking gate 390 → 392 passed
Correctness lint clean

🤖 Generated with Claude Code

Found by a release rehearsal against the built wheel, not by any test:
`orchestrator --version` failed with "No such option. Did you mean
'--verbose'?". There was no way to ask an installed copy what version it is,
which is the first thing anyone does with a release.

Uses click's `package_name` form, which reads the version from installed
distribution metadata rather than importing the package. That keeps the CLI
hermetic: answering `--version` must not run anything on the
credential-discovery path. Both properties are now tested -- the output
carries the real version, and a decoy ~/.orchestrator/.env is never read.

Verified against the built wheel in a clean venv, through both the
`orchestrator` and `py-orc` entry points.

Blocking gate 390 -> 392.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@jeremymanning
jeremymanning merged commit bce2a5c into main Aug 1, 2026
9 checks passed
@jeremymanning
jeremymanning deleted the fix/cli-version-option branch August 1, 2026 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant